<?
$lang = $_GET['lang']?$_GET['lang']:'cn';
setcookie("lang", $lang, time()+3600*24*30);
$ref = $_SERVER['HTTP_REFERER']?$_SERVER['HTTP_REFERER']:"index.php";
header("location:{$ref}");

?>